package synchronicity.discovery;

import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import synchronicity.agent.Agent;
import synchronicity.agent.ScheduleCollectorAgent;
import synchronicity.calendar.PIMCalendar;
import synchronicity.host.BluetoothSchedulerHostFactory;
import synchronicity.host.SchedulerHost;
import synchronicity.util.Range;
import synchronicity.util.RangeSet;

public class DiscoveryClient extends MIDlet {

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO Auto-generated method stub

	}

	protected void pauseApp() {
		// TODO Auto-generated method stub

	}

	protected void startApp() throws MIDletStateChangeException {
		SchedulerHost host = BluetoothSchedulerHostFactory.getInstance()
				.createSchedulerHost(PIMCalendar.getInstance());
		Agent agent = new ScheduleCollectorAgent(new Range(0, 0),
				new RangeSet());
		agent = host.traverse(agent);

		System.out.println("Holy crap!" + agent);
	}

}
